home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / toolpack.000 / toolpack / toolpack1.2 / scriptsource / syn.s < prev    next >
Encoding:
Text File  |  1993-10-04  |  1.8 KB  |  71 lines

  1. #! /bin/csh
  2. #  syn is a csh script to perform syntactic analysis of a Fortran program
  3. #  using ISTLY.
  4. #
  5. #
  6. #  Invocation:
  7. #
  8. #  syn Fortran_source_file
  9. #
  10. #  Check command line validity.
  11. if ( $#argv == '0' ) then
  12. TOOLPACKPATH/toolpack1.2/util/echoerr \
  13. Invocation:
  14. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  15. TOOLPACKPATH/toolpack1.2/util/echoerr \
  16. syn Fortran_source_file
  17. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  18. TOOLPACKPATH/toolpack1.2/util/echoerr \
  19. Error/Warning messages sent to standard output and may be redirected to a file.
  20. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  21.    exit
  22. endif
  23. #  Check that Fortran_source_file exists.
  24. if ( -e $1 == 0 ) then
  25. TOOLPACKPATH/toolpack1.2/util/echoerr \
  26. "'$1' does not exist."
  27.    exit
  28. endif
  29. #
  30. #  Create PFS.  If PFS already exists, exit with an advisory message.
  31. #
  32. if ( -e _.TOOLPACK == 0 ) then
  33.    mkdir _.TOOLPACK
  34. else
  35. TOOLPACKPATH/toolpack1.2/util/echoerr \
  36. Toolpack-created directory '"_.TOOLPACK"' exists. \
  37. Remove with script '"discard"'.
  38.    exit
  39. endif
  40. #  Make a tab-free copy of the Fortran source and use it as source.
  41. set src = ly.src$$
  42. expand $1 > _.TOOLPACK/$src
  43. #  Comment file name.
  44. set cmt = _.lycmt
  45. #  Parse tree file name.
  46. set tree = _.lytree
  47. #  Symbol table file name.
  48. set symb = _.ypsymb
  49. #  Comment index file name.
  50. set indx = _.lyindx
  51. #  Create the interprocess file IST.CMD and append parameters for ISTLY.
  52. TOOLPACKPATH/toolpack1.2/util/mkipf \
  53. $src $cmt $tree $symb $indx
  54. #
  55. #  Invoke ISTLY.
  56. #
  57. TOOLPACKPATH/toolpack1.2/exec/istly.u
  58. #
  59. #  If tool terminated with errors, advise user to obtain listing.
  60. if ( `cat _.TOOLPACK/_.info` == -1 ) then
  61. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  62. TOOLPACKPATH/toolpack1.2/util/echoerr \
  63. 'Errors detected.  Invoke script "getlst" to obtain a listing showing'
  64. TOOLPACKPATH/toolpack1.2/util/echoerr \
  65. statement and token numbers.
  66. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  67. endif
  68. #
  69. /bin/rm -r _.TOOLPACK
  70. #
  71.